package com.szdvte.news.action.service;

import java.util.List;

import org.apache.struts2.ServletActionContext;

import com.szdvte.news.bean.Comments;
import com.szdvte.news.service.ICommentsService;

public class CommentsAction {
	private Comments comments;
	private ICommentsService commentsService;
	private List<Comments> list;
	public String select(){
		list = commentsService.selectAll();
		ServletActionContext.getRequest().getSession().setAttribute("commentsList", list);
		return "comments";
	}
	public Comments getComments() {
		return comments;
	}
	public void setComments(Comments comments) {
		this.comments = comments;
	}
	public ICommentsService getCommentsService() {
		return commentsService;
	}
	public void setCommentsService(ICommentsService commentsService) {
		this.commentsService = commentsService;
	}
}
